package cn.kt.ipcount.chatgpt.repository;

import cn.kt.ipcount.chatgpt.domain.ChatgptInfo;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.Date;
import java.util.List;

/**
 * Created by tao.
 * Date: 2023/2/10 14:15
 * 描述:
 */
public interface ChatgptRepository extends JpaRepository<ChatgptInfo, Long>, JpaSpecificationExecutor<ChatgptInfo> {
    List<ChatgptInfo> findAllByOrderByIdDesc(Pageable pageable);

    List<ChatgptInfo> findAllByTimeIsBetween(Date start, Date end);

}
